< previous page page_649 next page >

Page 649
Table 29.2 Predefined Placeholders on a Data Report
CodeDescription
%pCurrent page number
%PTotal number of pages
%dCurrent date (short format); for example, 5/24/98
%DCurrent date (long format); for example, Sunday, May 24, 1998
%tCurrent time (short format); for example, 16:10
%TCurrent time (long format); for example, 4:10:00 PM
%iReport title (string stored in the Title property of the DataReport object)

rptlabel.gif To use one of these fields, simply place a RptLabel control on the report and set its Caption property to include the placeholder you want. For example, if you want to add a page number to the bottom of the page, draw a label in the Page Footer section and set its caption to the following string:
Page %p of %P
Run the report, and the Data Report automatically replaces the placeholders with the proper information, as shown in Figure 29.6.
0649-01.jpg
Figure 29.6
A page counter has been added to the sample report.
If you just want to use one of the placeholders by itself, without any of your own text, there is a quick way to add it to the report. Simply right-click the report, and choose Insert Control from the context-sensitive menu that appears. You can select from any of the predefined fields, as well as the other available report controls.
Adding Graphics
Graphical shapes and images do not add any functionality to your report, but they make it look nicer, so you can use them to highlight or visually organize certain information. Three controls allow you to add these elements: the RptImage, RptLine, and RptShape controls.

 
< previous page page_649 next page >